package edu.xhu.video.controller;

import edu.xhu.model.common.dtos.ResponseResult;
import edu.xhu.video.service.BiliVideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Api(value = "网页端视频播放Controller层", tags = "网页端视频播放Controller层")
@CrossOrigin
@RestController
@RequiredArgsConstructor
@RequestMapping("/bilivideo")
public class BiliVideoController {
    private final BiliVideoService biliVideoService;

    /**
     * b站视频上传
     *
     * @param vid
     * @return
     */
    @GetMapping("/test")
    @ApiOperation("bili视频播放测试接口")
    public ResponseResult<?> videoDetail(@RequestParam("vid") Long vid) {
        return biliVideoService.getVideoDetail(vid);
    }


}
